{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:44:01.777212800Z",
     "start_time": "2024-04-19T06:43:52.813748900Z"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "from sklearn.decomposition import PCA\n",
    "from sklearn.cluster import KMeans\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.metrics import silhouette_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:45:03.603895900Z",
     "start_time": "2024-04-19T06:44:53.716574100Z"
    }
   },
   "outputs": [],
   "source": [
    "# 读取四张表的数据\n",
    "#读取了订单和产品id的关联，csv比较大\n",
    "prior = pd.read_csv(\"./data/instacart/order_products__prior.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:45:05.236325Z",
     "start_time": "2024-04-19T06:45:05.096898400Z"
    }
   },
   "outputs": [],
   "source": [
    "#产品id，与过道的对应\n",
    "products = pd.read_csv(\"./data/instacart/products.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:45:09.040679100Z",
     "start_time": "2024-04-19T06:45:06.873773800Z"
    }
   },
   "outputs": [],
   "source": [
    "#订单id和用户id的对应，csv比较大\n",
    "orders = pd.read_csv(\"./data/instacart/orders.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:45:11.612704200Z",
     "start_time": "2024-04-19T06:45:11.564673200Z"
    }
   },
   "outputs": [],
   "source": [
    "#超市的过道，过道放的产品的品类\n",
    "aisles = pd.read_csv(\"./data/instacart/aisles.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "data": {
      "text/plain": "   order_id  product_id  add_to_cart_order  reordered\n0         2       33120                  1          1\n1         2       28985                  2          1\n2         2        9327                  3          0\n3         2       45918                  4          1\n4         2       30035                  5          0",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>add_to_cart_order</th>\n      <th>reordered</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2</td>\n      <td>33120</td>\n      <td>1</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2</td>\n      <td>28985</td>\n      <td>2</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>9327</td>\n      <td>3</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2</td>\n      <td>45918</td>\n      <td>4</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2</td>\n      <td>30035</td>\n      <td>5</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "prior.head()  #订单id，产品id"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    },
    "ExecuteTime": {
     "end_time": "2024-04-19T06:45:55.183227500Z",
     "start_time": "2024-04-19T06:45:55.131252Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "data": {
      "text/plain": "   product_id                                       product_name  aisle_id  \\\n0           1                         Chocolate Sandwich Cookies        61   \n1           2                                   All-Seasons Salt       104   \n2           3               Robust Golden Unsweetened Oolong Tea        94   \n3           4  Smart Ones Classic Favorites Mini Rigatoni Wit...        38   \n4           5                          Green Chile Anytime Sauce         5   \n\n   department_id  \n0             19  \n1             13  \n2              7  \n3              1  \n4             13  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>product_id</th>\n      <th>product_name</th>\n      <th>aisle_id</th>\n      <th>department_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>1</td>\n      <td>Chocolate Sandwich Cookies</td>\n      <td>61</td>\n      <td>19</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2</td>\n      <td>All-Seasons Salt</td>\n      <td>104</td>\n      <td>13</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>3</td>\n      <td>Robust Golden Unsweetened Oolong Tea</td>\n      <td>94</td>\n      <td>7</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>4</td>\n      <td>Smart Ones Classic Favorites Mini Rigatoni Wit...</td>\n      <td>38</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>5</td>\n      <td>Green Chile Anytime Sauce</td>\n      <td>5</td>\n      <td>13</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "products.head() #产品id，产品名称，过道id"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    },
    "ExecuteTime": {
     "end_time": "2024-04-19T06:46:25.656029200Z",
     "start_time": "2024-04-19T06:46:25.613051600Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "   order_id  user_id eval_set  order_number  order_dow  order_hour_of_day  \\\n0   2539329        1    prior             1          2                  8   \n1   2398795        1    prior             2          3                  7   \n2    473747        1    prior             3          3                 12   \n3   2254736        1    prior             4          4                  7   \n4    431534        1    prior             5          4                 15   \n\n   days_since_prior_order  \n0                     NaN  \n1                    15.0  \n2                    21.0  \n3                    29.0  \n4                    28.0  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>order_id</th>\n      <th>user_id</th>\n      <th>eval_set</th>\n      <th>order_number</th>\n      <th>order_dow</th>\n      <th>order_hour_of_day</th>\n      <th>days_since_prior_order</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2539329</td>\n      <td>1</td>\n      <td>prior</td>\n      <td>1</td>\n      <td>2</td>\n      <td>8</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2398795</td>\n      <td>1</td>\n      <td>prior</td>\n      <td>2</td>\n      <td>3</td>\n      <td>7</td>\n      <td>15.0</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>473747</td>\n      <td>1</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>3</td>\n      <td>12</td>\n      <td>21.0</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2254736</td>\n      <td>1</td>\n      <td>prior</td>\n      <td>4</td>\n      <td>4</td>\n      <td>7</td>\n      <td>29.0</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>431534</td>\n      <td>1</td>\n      <td>prior</td>\n      <td>5</td>\n      <td>4</td>\n      <td>15</td>\n      <td>28.0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "orders.head() #订单id，用户id"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    },
    "ExecuteTime": {
     "end_time": "2024-04-19T06:46:58.207097300Z",
     "start_time": "2024-04-19T06:46:58.174119600Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [
    {
     "data": {
      "text/plain": "   aisle_id                       aisle\n0         1       prepared soups salads\n1         2           specialty cheeses\n2         3         energy granola bars\n3         4               instant foods\n4         5  marinades meat preparation",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>aisle_id</th>\n      <th>aisle</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>1</td>\n      <td>prepared soups salads</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2</td>\n      <td>specialty cheeses</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>3</td>\n      <td>energy granola bars</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>4</td>\n      <td>instant foods</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>5</td>\n      <td>marinades meat preparation</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "aisles.head() #过道id，对应过道里放了哪些产品类别"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:49:48.327312Z",
     "start_time": "2024-04-19T06:48:36.889318800Z"
    }
   },
   "outputs": [],
   "source": [
    "# 合并四张表到一张表  （用户-物品类别）\n",
    "#订单表和产品表关联\n",
    "#用户买了哪些订单，订单里面有哪些产品，产品对应的过道，过道对应的产品类别\n",
    "_mg = pd.merge(prior, products, on=['product_id', 'product_id'])\n",
    "_mg = pd.merge(_mg, orders, on=['order_id', 'order_id'])\n",
    "mt = pd.merge(_mg, aisles, on=['aisle_id', 'aisle_id'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:50:07.943037400Z",
     "start_time": "2024-04-19T06:50:07.893066700Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "   order_id  product_id  add_to_cart_order  reordered  \\\n0         2       33120                  1          1   \n1         2       28985                  2          1   \n2         2        9327                  3          0   \n3         2       45918                  4          1   \n4         2       30035                  5          0   \n5         2       17794                  6          1   \n6         2       40141                  7          1   \n7         2        1819                  8          1   \n8         2       43668                  9          0   \n9         3       33754                  1          1   \n\n                                        product_name  aisle_id  department_id  \\\n0                                 Organic Egg Whites        86             16   \n1                              Michigan Organic Kale        83              4   \n2                                      Garlic Powder       104             13   \n3                                     Coconut Butter        19             13   \n4                                  Natural Sweetener        17             13   \n5                                            Carrots        83              4   \n6                   Original Unflavored Gelatine Mix       105             13   \n7           All Natural No Stir Creamy Almond Butter        88             13   \n8                            Classic Blend Cole Slaw       123              4   \n9  Total 2% with Strawberry Lowfat Greek Strained...       120             16   \n\n   user_id eval_set  order_number  order_dow  order_hour_of_day  \\\n0   202279    prior             3          5                  9   \n1   202279    prior             3          5                  9   \n2   202279    prior             3          5                  9   \n3   202279    prior             3          5                  9   \n4   202279    prior             3          5                  9   \n5   202279    prior             3          5                  9   \n6   202279    prior             3          5                  9   \n7   202279    prior             3          5                  9   \n8   202279    prior             3          5                  9   \n9   205970    prior            16          5                 17   \n\n   days_since_prior_order                       aisle  \n0                     8.0                        eggs  \n1                     8.0            fresh vegetables  \n2                     8.0           spices seasonings  \n3                     8.0               oils vinegars  \n4                     8.0          baking ingredients  \n5                     8.0            fresh vegetables  \n6                     8.0  doughs gelatins bake mixes  \n7                     8.0                     spreads  \n8                     8.0  packaged vegetables fruits  \n9                    12.0                      yogurt  ",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>order_id</th>\n      <th>product_id</th>\n      <th>add_to_cart_order</th>\n      <th>reordered</th>\n      <th>product_name</th>\n      <th>aisle_id</th>\n      <th>department_id</th>\n      <th>user_id</th>\n      <th>eval_set</th>\n      <th>order_number</th>\n      <th>order_dow</th>\n      <th>order_hour_of_day</th>\n      <th>days_since_prior_order</th>\n      <th>aisle</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2</td>\n      <td>33120</td>\n      <td>1</td>\n      <td>1</td>\n      <td>Organic Egg Whites</td>\n      <td>86</td>\n      <td>16</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>eggs</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2</td>\n      <td>28985</td>\n      <td>2</td>\n      <td>1</td>\n      <td>Michigan Organic Kale</td>\n      <td>83</td>\n      <td>4</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>fresh vegetables</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2</td>\n      <td>9327</td>\n      <td>3</td>\n      <td>0</td>\n      <td>Garlic Powder</td>\n      <td>104</td>\n      <td>13</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>spices seasonings</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2</td>\n      <td>45918</td>\n      <td>4</td>\n      <td>1</td>\n      <td>Coconut Butter</td>\n      <td>19</td>\n      <td>13</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>oils vinegars</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2</td>\n      <td>30035</td>\n      <td>5</td>\n      <td>0</td>\n      <td>Natural Sweetener</td>\n      <td>17</td>\n      <td>13</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>baking ingredients</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>2</td>\n      <td>17794</td>\n      <td>6</td>\n      <td>1</td>\n      <td>Carrots</td>\n      <td>83</td>\n      <td>4</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>fresh vegetables</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>2</td>\n      <td>40141</td>\n      <td>7</td>\n      <td>1</td>\n      <td>Original Unflavored Gelatine Mix</td>\n      <td>105</td>\n      <td>13</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>doughs gelatins bake mixes</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>2</td>\n      <td>1819</td>\n      <td>8</td>\n      <td>1</td>\n      <td>All Natural No Stir Creamy Almond Butter</td>\n      <td>88</td>\n      <td>13</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>spreads</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>2</td>\n      <td>43668</td>\n      <td>9</td>\n      <td>0</td>\n      <td>Classic Blend Cole Slaw</td>\n      <td>123</td>\n      <td>4</td>\n      <td>202279</td>\n      <td>prior</td>\n      <td>3</td>\n      <td>5</td>\n      <td>9</td>\n      <td>8.0</td>\n      <td>packaged vegetables fruits</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>3</td>\n      <td>33754</td>\n      <td>1</td>\n      <td>1</td>\n      <td>Total 2% with Strawberry Lowfat Greek Strained...</td>\n      <td>120</td>\n      <td>16</td>\n      <td>205970</td>\n      <td>prior</td>\n      <td>16</td>\n      <td>5</td>\n      <td>17</td>\n      <td>12.0</td>\n      <td>yogurt</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mt.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:50:12.835493200Z",
     "start_time": "2024-04-19T06:50:12.817494400Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "(32434489, 14)"
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mt.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "order_id                  0.00000\nproduct_id                0.00000\nadd_to_cart_order         0.00000\nreordered                 0.00000\nproduct_name              0.00000\naisle_id                  0.00000\ndepartment_id             0.00000\nuser_id                   0.00000\neval_set                  0.00000\norder_number              0.00000\norder_dow                 0.00000\norder_hour_of_day         0.00000\ndays_since_prior_order    0.06407\naisle                     0.00000\ndtype: float64"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mt.isnull().sum()/len(mt)  #数据缺失率，没有缺失值"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-19T06:51:03.000587500Z",
     "start_time": "2024-04-19T06:50:57.880702500Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:55:38.109991100Z",
     "start_time": "2024-04-19T06:53:48.722017500Z"
    }
   },
   "outputs": [],
   "source": [
    "# 交叉表（特殊的分组工具），如果在这一步内存不够了，重启一下jupyter，还是不行，筛选一部分用户的数据，进行聚类\n",
    "cross = pd.crosstab(mt['user_id'], mt['aisle'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:55:45.096219700Z",
     "start_time": "2024-04-19T06:55:45.053240700Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "aisle    air fresheners candles  asian foods  baby accessories  \\\nuser_id                                                          \n1                             0            0                 0   \n2                             0            3                 0   \n3                             0            0                 0   \n4                             0            0                 0   \n5                             0            2                 0   \n6                             0            0                 0   \n7                             0            0                 0   \n8                             0            1                 0   \n9                             0            0                 0   \n10                            0            1                 0   \n\naisle    baby bath body care  baby food formula  bakery desserts  \\\nuser_id                                                            \n1                          0                  0                0   \n2                          0                  0                0   \n3                          0                  0                0   \n4                          0                  0                0   \n5                          0                  0                0   \n6                          0                  0                0   \n7                          0                  0                0   \n8                          0                  0                0   \n9                          0                  6                0   \n10                         0                  0                0   \n\naisle    baking ingredients  baking supplies decor  beauty  beers coolers  \\\nuser_id                                                                     \n1                         0                      0       0              0   \n2                         2                      0       0              0   \n3                         0                      0       0              0   \n4                         0                      0       0              0   \n5                         0                      0       0              0   \n6                         0                      0       0              0   \n7                         2                      0       0              0   \n8                         1                      0       0              0   \n9                         2                      0       0              0   \n10                        0                      0       0              0   \n\naisle    ...  spreads  tea  tofu meat alternatives  tortillas flat bread  \\\nuser_id  ...                                                               \n1        ...        1    0                       0                     0   \n2        ...        3    1                       1                     0   \n3        ...        4    1                       0                     0   \n4        ...        0    0                       0                     1   \n5        ...        0    0                       0                     0   \n6        ...        0    0                       0                     0   \n7        ...        0    0                       0                     0   \n8        ...        0    0                       0                     0   \n9        ...        0    0                       0                     0   \n10       ...        0    0                       0                     0   \n\naisle    trail mix snack mix  trash bags liners  vitamins supplements  \\\nuser_id                                                                 \n1                          0                  0                     0   \n2                          0                  0                     0   \n3                          0                  0                     0   \n4                          0                  0                     0   \n5                          0                  0                     0   \n6                          0                  0                     0   \n7                          0                  0                     0   \n8                          0                  0                     0   \n9                          0                  0                     0   \n10                         0                  0                     0   \n\naisle    water seltzer sparkling water  white wines  yogurt  \nuser_id                                                      \n1                                    0            0       1  \n2                                    2            0      42  \n3                                    2            0       0  \n4                                    1            0       0  \n5                                    0            0       3  \n6                                    0            0       0  \n7                                    0            0       5  \n8                                    0            0       0  \n9                                    2            0      19  \n10                                   0            0       2  \n\n[10 rows x 134 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th>aisle</th>\n      <th>air fresheners candles</th>\n      <th>asian foods</th>\n      <th>baby accessories</th>\n      <th>baby bath body care</th>\n      <th>baby food formula</th>\n      <th>bakery desserts</th>\n      <th>baking ingredients</th>\n      <th>baking supplies decor</th>\n      <th>beauty</th>\n      <th>beers coolers</th>\n      <th>...</th>\n      <th>spreads</th>\n      <th>tea</th>\n      <th>tofu meat alternatives</th>\n      <th>tortillas flat bread</th>\n      <th>trail mix snack mix</th>\n      <th>trash bags liners</th>\n      <th>vitamins supplements</th>\n      <th>water seltzer sparkling water</th>\n      <th>white wines</th>\n      <th>yogurt</th>\n    </tr>\n    <tr>\n      <th>user_id</th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>1</th>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>0</td>\n      <td>3</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>3</td>\n      <td>1</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>42</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>4</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>3</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>5</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>6</td>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n      <td>0</td>\n      <td>19</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n    </tr>\n  </tbody>\n</table>\n<p>10 rows × 134 columns</p>\n</div>"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cross.head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:55:49.721935700Z",
     "start_time": "2024-04-19T06:55:49.688955Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "(206209, 134)"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#针对20万用户，有134个特征\n",
    "cross.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "pandas.core.frame.DataFrame"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(cross)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:56:09.102335800Z",
     "start_time": "2024-04-19T06:56:09.072353800Z"
    }
   },
   "outputs": [],
   "source": [
    "# 进行主成分分析,那么大家还记得不？，保留90%的成分，实际特征数目减少了几倍，134--》27\n",
    "pca = PCA(n_components=0.9)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:56:18.064506100Z",
     "start_time": "2024-04-19T06:56:11.286824600Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "(206209, 27)"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pca.fit_transform(cross)  #还记得fit_transform的作用不？\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "outputs": [
    {
     "data": {
      "text/plain": "numpy.ndarray"
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(data)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    },
    "ExecuteTime": {
     "end_time": "2024-04-19T06:56:27.459954600Z",
     "start_time": "2024-04-19T06:56:27.441965500Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:56:48.659647200Z",
     "start_time": "2024-04-19T06:56:48.644656300Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "(500, 27)"
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 把样本数量减少\n",
    "x = data[:500]\n",
    "x.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "array([[-24.21565874,   2.4294272 ,  -2.46636975, ...,   0.68680034,\n          1.69439402,  -2.34323022],\n       [  6.46320806,  36.75111647,   8.38255336, ...,   4.12121252,\n          2.4468974 ,  -4.28348478],\n       [ -7.99030162,   2.40438257, -11.03006405, ...,   1.77534453,\n         -0.44419403,   0.78666557],\n       ...,\n       [-11.92661183,  -6.28156437,   6.49043833, ...,  -0.93499096,\n         -0.1409791 ,   0.04370174],\n       [-18.05675245,  -0.42589035,  -3.92660866, ...,  -1.02048351,\n         -0.95283767,   0.90135767],\n       [-24.62244434,  -0.5635177 ,  -0.90551124, ...,   0.86904501,\n         -2.15569229,  -0.40915483]])"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "407.18563418250557"
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "-242.3484794930586"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:58:01.163649900Z",
     "start_time": "2024-04-19T06:58:01.156652200Z"
    }
   },
   "outputs": [],
   "source": [
    "# 假设用户一共分为四个类别\n",
    "#n_clusters是分为几个类别，是主要的超参\n",
    "km = KMeans(n_clusters=4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:58:05.195738300Z",
     "start_time": "2024-04-19T06:58:04.673032200Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "KMeans(n_clusters=4)",
      "text/html": "<style>#sk-container-id-1 {\n  /* Definition of color scheme common for light and dark mode */\n  --sklearn-color-text: black;\n  --sklearn-color-line: gray;\n  /* Definition of color scheme for unfitted estimators */\n  --sklearn-color-unfitted-level-0: #fff5e6;\n  --sklearn-color-unfitted-level-1: #f6e4d2;\n  --sklearn-color-unfitted-level-2: #ffe0b3;\n  --sklearn-color-unfitted-level-3: chocolate;\n  /* Definition of color scheme for fitted estimators */\n  --sklearn-color-fitted-level-0: #f0f8ff;\n  --sklearn-color-fitted-level-1: #d4ebff;\n  --sklearn-color-fitted-level-2: #b3dbfd;\n  --sklearn-color-fitted-level-3: cornflowerblue;\n\n  /* Specific color for light theme */\n  --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n  --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n  --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n  --sklearn-color-icon: #696969;\n\n  @media (prefers-color-scheme: dark) {\n    /* Redefinition of color scheme for dark theme */\n    --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n    --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n    --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n    --sklearn-color-icon: #878787;\n  }\n}\n\n#sk-container-id-1 {\n  color: var(--sklearn-color-text);\n}\n\n#sk-container-id-1 pre {\n  padding: 0;\n}\n\n#sk-container-id-1 input.sk-hidden--visually {\n  border: 0;\n  clip: rect(1px 1px 1px 1px);\n  clip: rect(1px, 1px, 1px, 1px);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n#sk-container-id-1 div.sk-dashed-wrapped {\n  border: 1px dashed var(--sklearn-color-line);\n  margin: 0 0.4em 0.5em 0.4em;\n  box-sizing: border-box;\n  padding-bottom: 0.4em;\n  background-color: var(--sklearn-color-background);\n}\n\n#sk-container-id-1 div.sk-container {\n  /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n     but bootstrap.min.css set `[hidden] { display: none !important; }`\n     so we also need the `!important` here to be able to override the\n     default hidden behavior on the sphinx rendered scikit-learn.org.\n     See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n  display: inline-block !important;\n  position: relative;\n}\n\n#sk-container-id-1 div.sk-text-repr-fallback {\n  display: none;\n}\n\ndiv.sk-parallel-item,\ndiv.sk-serial,\ndiv.sk-item {\n  /* draw centered vertical line to link estimators */\n  background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n  background-size: 2px 100%;\n  background-repeat: no-repeat;\n  background-position: center center;\n}\n\n/* Parallel-specific style estimator block */\n\n#sk-container-id-1 div.sk-parallel-item::after {\n  content: \"\";\n  width: 100%;\n  border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n  flex-grow: 1;\n}\n\n#sk-container-id-1 div.sk-parallel {\n  display: flex;\n  align-items: stretch;\n  justify-content: center;\n  background-color: var(--sklearn-color-background);\n  position: relative;\n}\n\n#sk-container-id-1 div.sk-parallel-item {\n  display: flex;\n  flex-direction: column;\n}\n\n#sk-container-id-1 div.sk-parallel-item:first-child::after {\n  align-self: flex-end;\n  width: 50%;\n}\n\n#sk-container-id-1 div.sk-parallel-item:last-child::after {\n  align-self: flex-start;\n  width: 50%;\n}\n\n#sk-container-id-1 div.sk-parallel-item:only-child::after {\n  width: 0;\n}\n\n/* Serial-specific style estimator block */\n\n#sk-container-id-1 div.sk-serial {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  background-color: var(--sklearn-color-background);\n  padding-right: 1em;\n  padding-left: 1em;\n}\n\n\n/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\nclickable and can be expanded/collapsed.\n- Pipeline and ColumnTransformer use this feature and define the default style\n- Estimators will overwrite some part of the style using the `sk-estimator` class\n*/\n\n/* Pipeline and ColumnTransformer style (default) */\n\n#sk-container-id-1 div.sk-toggleable {\n  /* Default theme specific background. It is overwritten whether we have a\n  specific estimator or a Pipeline/ColumnTransformer */\n  background-color: var(--sklearn-color-background);\n}\n\n/* Toggleable label */\n#sk-container-id-1 label.sk-toggleable__label {\n  cursor: pointer;\n  display: block;\n  width: 100%;\n  margin-bottom: 0;\n  padding: 0.5em;\n  box-sizing: border-box;\n  text-align: center;\n}\n\n#sk-container-id-1 label.sk-toggleable__label-arrow:before {\n  /* Arrow on the left of the label */\n  content: \"▸\";\n  float: left;\n  margin-right: 0.25em;\n  color: var(--sklearn-color-icon);\n}\n\n#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {\n  color: var(--sklearn-color-text);\n}\n\n/* Toggleable content - dropdown */\n\n#sk-container-id-1 div.sk-toggleable__content {\n  max-height: 0;\n  max-width: 0;\n  overflow: hidden;\n  text-align: left;\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-0);\n}\n\n#sk-container-id-1 div.sk-toggleable__content.fitted {\n  /* fitted */\n  background-color: var(--sklearn-color-fitted-level-0);\n}\n\n#sk-container-id-1 div.sk-toggleable__content pre {\n  margin: 0.2em;\n  border-radius: 0.25em;\n  color: var(--sklearn-color-text);\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-0);\n}\n\n#sk-container-id-1 div.sk-toggleable__content.fitted pre {\n  /* unfitted */\n  background-color: var(--sklearn-color-fitted-level-0);\n}\n\n#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n  /* Expand drop-down */\n  max-height: 200px;\n  max-width: 100%;\n  overflow: auto;\n}\n\n#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n  content: \"▾\";\n}\n\n/* Pipeline/ColumnTransformer-specific style */\n\n#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n  color: var(--sklearn-color-text);\n  background-color: var(--sklearn-color-unfitted-level-2);\n}\n\n#sk-container-id-1 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n  background-color: var(--sklearn-color-fitted-level-2);\n}\n\n/* Estimator-specific style */\n\n/* Colorize estimator box */\n#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-2);\n}\n\n#sk-container-id-1 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n  /* fitted */\n  background-color: var(--sklearn-color-fitted-level-2);\n}\n\n#sk-container-id-1 div.sk-label label.sk-toggleable__label,\n#sk-container-id-1 div.sk-label label {\n  /* The background is the default theme color */\n  color: var(--sklearn-color-text-on-default-background);\n}\n\n/* On hover, darken the color of the background */\n#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {\n  color: var(--sklearn-color-text);\n  background-color: var(--sklearn-color-unfitted-level-2);\n}\n\n/* Label box, darken color on hover, fitted */\n#sk-container-id-1 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n  color: var(--sklearn-color-text);\n  background-color: var(--sklearn-color-fitted-level-2);\n}\n\n/* Estimator label */\n\n#sk-container-id-1 div.sk-label label {\n  font-family: monospace;\n  font-weight: bold;\n  display: inline-block;\n  line-height: 1.2em;\n}\n\n#sk-container-id-1 div.sk-label-container {\n  text-align: center;\n}\n\n/* Estimator-specific */\n#sk-container-id-1 div.sk-estimator {\n  font-family: monospace;\n  border: 1px dotted var(--sklearn-color-border-box);\n  border-radius: 0.25em;\n  box-sizing: border-box;\n  margin-bottom: 0.5em;\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-0);\n}\n\n#sk-container-id-1 div.sk-estimator.fitted {\n  /* fitted */\n  background-color: var(--sklearn-color-fitted-level-0);\n}\n\n/* on hover */\n#sk-container-id-1 div.sk-estimator:hover {\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-2);\n}\n\n#sk-container-id-1 div.sk-estimator.fitted:hover {\n  /* fitted */\n  background-color: var(--sklearn-color-fitted-level-2);\n}\n\n/* Specification for estimator info (e.g. \"i\" and \"?\") */\n\n/* Common style for \"i\" and \"?\" */\n\n.sk-estimator-doc-link,\na:link.sk-estimator-doc-link,\na:visited.sk-estimator-doc-link {\n  float: right;\n  font-size: smaller;\n  line-height: 1em;\n  font-family: monospace;\n  background-color: var(--sklearn-color-background);\n  border-radius: 1em;\n  height: 1em;\n  width: 1em;\n  text-decoration: none !important;\n  margin-left: 1ex;\n  /* unfitted */\n  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n  color: var(--sklearn-color-unfitted-level-1);\n}\n\n.sk-estimator-doc-link.fitted,\na:link.sk-estimator-doc-link.fitted,\na:visited.sk-estimator-doc-link.fitted {\n  /* fitted */\n  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n  color: var(--sklearn-color-fitted-level-1);\n}\n\n/* On hover */\ndiv.sk-estimator:hover .sk-estimator-doc-link:hover,\n.sk-estimator-doc-link:hover,\ndiv.sk-label-container:hover .sk-estimator-doc-link:hover,\n.sk-estimator-doc-link:hover {\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-3);\n  color: var(--sklearn-color-background);\n  text-decoration: none;\n}\n\ndiv.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n.sk-estimator-doc-link.fitted:hover,\ndiv.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n.sk-estimator-doc-link.fitted:hover {\n  /* fitted */\n  background-color: var(--sklearn-color-fitted-level-3);\n  color: var(--sklearn-color-background);\n  text-decoration: none;\n}\n\n/* Span, style for the box shown on hovering the info icon */\n.sk-estimator-doc-link span {\n  display: none;\n  z-index: 9999;\n  position: relative;\n  font-weight: normal;\n  right: .2ex;\n  padding: .5ex;\n  margin: .5ex;\n  width: min-content;\n  min-width: 20ex;\n  max-width: 50ex;\n  color: var(--sklearn-color-text);\n  box-shadow: 2pt 2pt 4pt #999;\n  /* unfitted */\n  background: var(--sklearn-color-unfitted-level-0);\n  border: .5pt solid var(--sklearn-color-unfitted-level-3);\n}\n\n.sk-estimator-doc-link.fitted span {\n  /* fitted */\n  background: var(--sklearn-color-fitted-level-0);\n  border: var(--sklearn-color-fitted-level-3);\n}\n\n.sk-estimator-doc-link:hover span {\n  display: block;\n}\n\n/* \"?\"-specific style due to the `<a>` HTML tag */\n\n#sk-container-id-1 a.estimator_doc_link {\n  float: right;\n  font-size: 1rem;\n  line-height: 1em;\n  font-family: monospace;\n  background-color: var(--sklearn-color-background);\n  border-radius: 1rem;\n  height: 1rem;\n  width: 1rem;\n  text-decoration: none;\n  /* unfitted */\n  color: var(--sklearn-color-unfitted-level-1);\n  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n}\n\n#sk-container-id-1 a.estimator_doc_link.fitted {\n  /* fitted */\n  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n  color: var(--sklearn-color-fitted-level-1);\n}\n\n/* On hover */\n#sk-container-id-1 a.estimator_doc_link:hover {\n  /* unfitted */\n  background-color: var(--sklearn-color-unfitted-level-3);\n  color: var(--sklearn-color-background);\n  text-decoration: none;\n}\n\n#sk-container-id-1 a.estimator_doc_link.fitted:hover {\n  /* fitted */\n  background-color: var(--sklearn-color-fitted-level-3);\n}\n</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>KMeans(n_clusters=4)</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" checked><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;&nbsp;KMeans<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.cluster.KMeans.html\">?<span>Documentation for KMeans</span></a><span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></label><div class=\"sk-toggleable__content fitted\"><pre>KMeans(n_clusters=4)</pre></div> </div></div></div></div>"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "km.fit(x)  #开始训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:58:10.692745800Z",
     "start_time": "2024-04-19T06:58:10.675756800Z"
    }
   },
   "outputs": [],
   "source": [
    "#开始预测\n",
    "predict = km.predict(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T06:59:14.009619Z",
     "start_time": "2024-04-19T06:59:13.990629500Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0\n",
      " 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0\n",
      " 2 0 0 0 0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\n",
      " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 1 0 0 0 1 0 0\n",
      " 0 0 0 1 2 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0\n",
      " 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 2 0 0 0 0 1 3 0 0 0 2 0 0 0 0 1 0 0 0\n",
      " 1 0 0 0 2 0 0 0 0 2 1 1 0 2 0 0 0 0 0 0 2 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0\n",
      " 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 0 0 0 0 0 0 0 3 1 0 0 0 0 0 0\n",
      " 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 3 0 0 0 0 0 0 0 2 0 1 0 0 0 1 0 0 0 0 0 0\n",
      " 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
      " 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 2 0 0 0 0 2 0 0 0 0\n",
      " 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 3\n",
      " 0 0 0 1 0 0 1 2 0 1 0 0 0 0 0 0 0 1 0 2 1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2\n",
      " 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0]\n"
     ]
    }
   ],
   "source": [
    "print(predict)  #预测得到的是每一个样本的类别"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T07:03:01.897395200Z",
     "start_time": "2024-04-19T07:03:01.883402400Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "array([0, 1, 2, 3])"
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "np.unique(predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T07:03:06.443832300Z",
     "start_time": "2024-04-19T07:03:06.407866800Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 1440x1440 with 0 Axes>"
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 1440x1440 with 0 Axes>"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 显示聚类的结果\n",
    "plt.figure(figsize=(20, 20))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T07:05:45.449668700Z",
     "start_time": "2024-04-19T07:05:45.222792700Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "<matplotlib.collections.PathCollection at 0x148be065220>"
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAA+i0lEQVR4nO3dd3hUVfrA8e+ZngYESKgiRYog0puKgiBi+YGAC7iKBdfe1rVgX117b4iKq64FURQRLIAgItKkd6QLoSWhhpTp5/fHHUKSmYSQTDKTyft5nnkyOXfm3neG8M6dc895j9JaI4QQIjaZIh2AEEKIiiNJXgghYpgkeSGEiGGS5IUQIoZJkhdCiBhmiXQABdWtW1c3bdo00mEIIUSVsnz58gNa65RQ26IqyTdt2pRly5ZFOgwhhKhSlFI7i9sm3TVCCBHDJMkLIUQMkyQvhBAxTJK8EELEMEnyQogKcXjHYXbO20nuwdxIh1KtRdXoGiFE1ec65mLSsEns+n0XZrsZr9NLj7t60P+l/iilIh1etSNn8kKIsJp24zR2ztuJ1+nFddSFz+Vj6bilrPxoZaRDq5YkyQshwsZ1zMWmqZvwuXyF2j25Hha9uihCUVVvkuSFEGHjPuZGmUJ3yeQdyqvkaARIkhdChFFig0Ti6sQFtSuTonn/5hGISEiSF0KEjVKKy9+/HGu8Nf+M3mwzY69p58JnLoxwdNWTjK4RQoRVq8taccP8G1j4ykIObTnE6eefTq9/9SKpYVKkQ6uWJMkLIcKuQacGDJswLNJhCKS7RgghYpokeSGEiGGS5IUQIoZJkhdCiBgmSV4IIWKYJHkhhIhhkuSFECKGSZIXQogYJkleCCFimCR5IYSIYeVO8koph1JqiVJqtVJqvVLqqUB7M6XUH0qprUqpr5RStvKHK4QQ4lSE40zeBVyote4AdAQGKqV6Ai8Cr2utzwAOAzeG4VhCCCFOQbmTvDZkB361Bm4auBD4JtD+CXBFeY8lhBDi1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5IUQIob9P/U+pIpHWtxwAAAAAElFTkSuQmCC\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 建立四个颜色的列表\n",
    "colored = ['orange', 'green', 'blue', 'purple']\n",
    "colr = [colored[i] for i in predict]\n",
    "#去选择任意两个特征来看聚类的图，可以自行调整,第2个，第20个特征\n",
    "plt.scatter(x[:, 3], x[:, 21], color=colr)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T07:07:31.699801200Z",
     "start_time": "2024-04-19T07:07:31.651812200Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "0.6501274541360761"
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 评判聚类效果，轮廓系数，聚类效果很难超过0.7，可以通过这个得分去调整上面KMeans的n_clusters\n",
    "silhouette_score(x, predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2024-04-19T07:09:11.778570Z",
     "start_time": "2024-04-19T07:09:11.727601100Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.635131635001924\n"
     ]
    },
    {
     "data": {
      "text/plain": "array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n       1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n       1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,\n       1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1,\n       1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,\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 1, 1, 3, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2,\n       1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,\n       1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1])"
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#改为2时的结果\n",
    "km = KMeans(n_clusters=5)\n",
    "km.fit(x)  #开始训练\n",
    "predict = km.predict(x)\n",
    "print(silhouette_score(x, predict))\n",
    "predict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "outputs": [
    {
     "data": {
      "text/plain": "aisle\nair fresheners candles           0\nasian foods                      0\nbaby accessories                 0\nbaby bath body care              0\nbaby food formula                0\n                                ..\ntrash bags liners                0\nvitamins supplements             0\nwater seltzer sparkling water    0\nwhite wines                      0\nyogurt                           1\nName: 1, Length: 134, dtype: int64"
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 通过分类后数据，去看原始样本的特点\n",
    "cross.iloc[0]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "outputs": [
    {
     "data": {
      "text/plain": "aisle\nair fresheners candles             0\nasian foods                        4\nbaby accessories                   0\nbaby bath body care                0\nbaby food formula                  0\n                                ... \ntrash bags liners                  0\nvitamins supplements               0\nwater seltzer sparkling water     92\nwhite wines                        0\nyogurt                           150\nName: 27, Length: 134, dtype: int64"
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "predict[26]\n",
    "cross.iloc[26]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "outputs": [
    {
     "data": {
      "text/plain": "0.6471264722807814"
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#改为3时的结果\n",
    "km = KMeans(n_clusters=3)\n",
    "km.fit(x)  #开始训练\n",
    "predict = km.predict(x)\n",
    "silhouette_score(x, predict)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEWCAYAAABmE+CbAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAABHe0lEQVR4nO3dd5gTVffA8e/Zvtld6i4iS28igigLUkS6ICCgCAKKviBNUSxgf+29lxdFQaQIiIAoIKJIVVG6FCmCSAeRoizbW+7vjwR/IWSXAElms3s+z5OH5N7JzJlsyJm5d+ZeMcaglFJKhVgdgFJKqcJBE4JSSilAE4JSSiknTQhKKaUATQhKKaWcNCEopZQCNCEUOyKyTEQGned7K4tIqoiE+jou5TsiskdE2lsdh6+JyOMiMs7qOIoyTQhBJND/0d23Z4zZZ4yJNcbk+WFbRkTSnAknVURO+HobZ9m+V5+tiFQTEbuIfBCIuAJJRJ4RkRwRSXE+dojIeyJy8TmswyffURFpLSIHXMuMMS8ZY87rYEZ5RxOCKkwaOBNOrDGm1Lm+WUTC/BCTu9uBf4DeIhIZgO0F2nRjTBxQBrgRKA+sO5ekoIKXJoQgJSI1ReR7EUkWkWMiMt2lrrmIrHHWrRGR5vmso4aILBGR4851TBWRUs66yUBl4CvnEfvDIlLVeSQf5lymgojMFZG/RWSniAx2WfczIjJDRD5xHm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HAnhaECjtMZc4Hbn1UZNgWRjzJ9ne1ORaTIyhW+ojIDxct9fB2KBmc5+9H3GmG6WBe1DXu5/keTlvi8AOojIViAPeMgYE/Rnxl7u+0jgIxF5AEcHc/+icBAoItNwJPl4Z//I00A4gDHmQxz9JZ2BnUA6MMCr9RaBz0YppZQPFKUmI6WUUhdAE4JSSilAE4JSSiknTQhKKaUATQhKKaWcNCGoYkdE8kRkg8uj6nms4wYRqeuH8E6t/1sROSEi8/y1DaXcFZn7EJQ6BxnGmCsucB03APOArd6+QUTCnGNoeeN1wAYMPffQlDo/eoagFCAiSSLyvYisE5EFp0aGFJHBIrJGRDaKyCwRsYlIc6Ab8LrzDKOGiCw7NRSGiMQ7h8hARPqLyFwRWQIsFpEY51j2q51j9HsalRVjzGIgJSA7r5STJgRVHEW7NBd9KSLhwCigpzEmCRgPvOhc9gtjTGNjTANgGzDQGPMzjqEBHjLGXGGM+eMs22voXHcrHGNJLTHGXIVjjorXRSTGD/uo1DnTJiNVHJ3WZCQi9XAMfrfQOaxHKHBq3Jd6IvICUArH0B8LzmN7C40xp8au7wB0E5EHna+jgMo4ko1SltKEoJRjVqktxphmHuomAjcYYzaKSH+cg8R5kMv/n3FHudWluW3rJmPM9vOOVik/0SYjpWA7kOAcLx8RCReRy5x1ccCfzmalW13ek+KsO2UPkOR83rOAbS0Ahp+aqc85Cq1ShYImBFXsOadf7Am8KiIbgQ1Ac2f1k8Aq4CfgN5e3fQY85OwYrgG8AdwlIuspeLz953GMSrlJRLY4X59BRH4EZuKY5vWAiHQ83/1Tyls62qlSSilAzxCUUko5aUJQSikFaEJQSinlpAlBKaUUoAlBKaWUkyYEpZRSgCYEpZRSTv8HTbz2bX7g4U8AAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "from sklearn.ensemble import IsolationForest\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 随机生成50个数据点\n",
    "np.random.seed(42)  # 为了结果的可重复性设置随机种子\n",
    "X = np.random.rand(50, 2)  # 2维数据\n",
    "\n",
    "# 初始化Isolation Forest模型\n",
    "iso_forest = IsolationForest(random_state=42, contamination=0.1)\n",
    "\n",
    "# 训练模型\n",
    "iso_forest.fit(X)\n",
    "\n",
    "# 预测每个点的异常分数\n",
    "scores = iso_forest.decision_function(X)\n",
    "\n",
    "# 将异常分数转换为0（正常）和1（异常）的标签\n",
    "labels = iso_forest.predict(X)\n",
    "\n",
    "# 绘制数据点和异常点\n",
    "plt.scatter(X[:, 0], X[:, 1], c=labels, cmap=plt.cm.bwr, edgecolor='k', s=50)\n",
    "plt.title('Isolation Forest Anomaly Detection')\n",
    "plt.xlabel('Feature 1')\n",
    "plt.ylabel('Feature 2')\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-19T07:32:53.594631300Z",
     "start_time": "2024-04-19T07:32:52.804082100Z"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
